#include <iostream>

using namespace std;

int main(int argc, char const *argv[])
{
    int number = 0;//初始化元素
    int new_number = 0;

    cout <<"用户输入要求阶乘的数" <<endl;
    cin >> number;//用户定义元素

    new_number = number;
    
    if(number == 0)
    {
    cout << "您输入数的阶乘为：1" <<endl;
    return 0;
    }
    for (int i = 1; i < number; i++)
    {
        new_number = new_number * (number - i);
    }
    cout << "您输入数的阶乘为：" << new_number << endl;
    return 0;
}